import Cookies from "js-cookie";
// 变量
const TokenKey = "tokenAdmin";
const UserNameKey = "username";
// 获取token
export function getToken() {
  return Cookies.get(TokenKey);
}
// 写入token
export function setToken(value) {
  return Cookies.set(TokenKey, value);
}
// 删除token
export function removeToken() {
  return Cookies.remove(TokenKey);
}
// 写入userName
export function setUsername(value) {
  return Cookies.set(UserNameKey, value);
}
// 获取userName
export function getUsername() {
  return Cookies.get(UserNameKey);
}
// 删除userName
export function removeUsername() {
  return Cookies.remove(UserNameKey);
}
